package com.qyer.search.model.aggregation;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * Created by tangzheng on 16/8/9.
 */
public class VTYPEDES {
  //key 为categoryid,value为tagid
  private Map<Integer, Set<Integer>> STG_FILTER_MAP;
  //key 为stype,value同上
  private Map<Integer, Map<Integer, Set<Integer>>> ST_FILTER_MAP;

  public VTYPEDES(Map<Integer, Set<Integer>> STG_FILTER_MAP,
                  Map<Integer, Map<Integer, Set<Integer>>> ST_FILTER_MAP) {
    this.STG_FILTER_MAP = STG_FILTER_MAP;
    this.ST_FILTER_MAP = ST_FILTER_MAP;
  }

  public VTYPEDES() {
    STG_FILTER_MAP = new HashMap<>();
    ST_FILTER_MAP = new HashMap<>();
  }

  public Map<Integer, Set<Integer>> getSTG_FILTER_MAP() {
    return STG_FILTER_MAP;
  }

  public void setSTG_FILTER_MAP(Map<Integer, Set<Integer>> STG_FILTER_MAP) {
    this.STG_FILTER_MAP = STG_FILTER_MAP;
  }

  public Map<Integer, Map<Integer, Set<Integer>>> getST_FILTER_MAP() {
    return ST_FILTER_MAP;
  }

  public void setST_FILTER_MAP(Map<Integer, Map<Integer, Set<Integer>>> ST_FILTER_MAP) {
    this.ST_FILTER_MAP = ST_FILTER_MAP;
  }

  @Override public boolean equals(Object o) {
    if (this == o)
      return true;
    if (o == null || getClass() != o.getClass())
      return false;

    VTYPEDES vtypedes = (VTYPEDES) o;

    if (!STG_FILTER_MAP.equals(vtypedes.STG_FILTER_MAP))
      return false;
    return ST_FILTER_MAP.equals(vtypedes.ST_FILTER_MAP);

  }

  @Override public int hashCode() {
    int result = STG_FILTER_MAP.hashCode();
    result = 31 * result + ST_FILTER_MAP.hashCode();
    return result;
  }

  @Override public String toString() {
    return "VTYPEDES{" +
      "STG_FILTER_MAP=" + STG_FILTER_MAP +
      ", ST_FILTER_MAP=" + ST_FILTER_MAP +
      '}';
  }
}
